<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    453. Minimum Moves to Equal Array Elements
   </h1>
   <p>
    Given a
    <b>
     non-empty
    </b>
    integer array of size
    <i>
     n
    </i>
    , find the minimum number of moves required to make all array elements equal, where a move is incrementing
    <i>
     n
    </i>
    - 1 elements by 1.
   </p>
   <p>
    <b>
     Example:
    </b>
   </p>
   <pre>
<b>Input:</b>
[1,2,3]

<b>Output:</b>
3

<b>Explanation:</b>
Only three moves are needed (remember each move increments two elements):

[1,2,3]  =&gt;  [2,3,3]  =&gt;  [3,4,3]  =&gt;  [4,4,4]
</pre>
  </div>
  <div>
   <h1 class="question_title">
    453. 最小移动次数使数组元素相等
   </h1>
   <p>
    给定一个长度为
    <em>
     n
    </em>
    的
    <strong>
     非空
    </strong>
    整数数组，找到让数组所有元素相等的最小移动次数。每次移动可以使
    <em>
     n
    </em>
    - 1 个元素增加 1。
   </p>
   <p>
    <strong>
     示例:
    </strong>
   </p>
   <pre>
<strong>输入:</strong>
[1,2,3]

<strong>输出:</strong>
3

<strong>解释:</strong>
只需要3次移动（注意每次移动会增加两个元素的值）：

[1,2,3]  =&gt;  [2,3,3]  =&gt;  [3,4,3]  =&gt;  [4,4,4]
</pre>
  </div>
 </body>
</html>